{% extends "abstracts/base.jinja" %}
{% block title %}Maloja - Artist Charts{% endblock %}

{% import 'snippets/filterdescription.jinja' as filterdesc %}

{% block scripts %}
	<script src="/datechange.js" async></script>
{% endblock %}

{% set charts = dbc.get_charts_artists(filterkeys,limitkeys,specialkeys) %}



{% set pages = math.ceil(charts.__len__() / amountkeys.perpage) %}
{% if charts[0] is defined %}
	{% set topartist = charts[0].artist %}
	{% set img = images.get_artist_image(topartist) %}
{% else %}
	{% set img = "/favicon.png" %}
{% endif %}



{% block content %}

<table class="top_info">
	<tr>
		<td class="image">
			<div style="background-image:url('{{ img }}')"></div>
		</td>
		<td class="text">
			<h1>Artist Charts</h1><a href="/top_artists"><span>View #1 Artists</span></a><br/>
			{{ filterdesc.desc(filterkeys,limitkeys) }}
			<br/><br/>
			{% with delimitkeys = {}, artistchart=True %}
			{% include 'snippets/timeselection.jinja' %}
			{% endwith %}

		</td>
	</tr>
</table>

{% if settings['CHARTS_DISPLAY_TILES'] %}
	{% include 'partials/charts_artists_tiles.jinja' %}
	<br/><br/>
{% endif %}

{% with compare=true %}
{% include 'partials/charts_artists.jinja' %}
{% endwith %}

{% import 'snippets/pagination.jinja' as pagination %}
{{ pagination.pagination(filterkeys,limitkeys,delimitkeys,amountkeys,pages) }}

{% endblock %}
